package com.lovegu.object.middle;

/**
 * @author 老顾
 * @title: Student1
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/9/21 8:11
 */
public class Student1 extends Person1{
    public String school;

    @Override
    public String getInfo() { //重写方法
        return "Name: "+ name + "\nage: "+ age + "\nschool: "+ school;
    }
    public static void main(String args[]){
        Student1 s1=new Student1();
        s1.name="Bob";
        s1.age=20;
        s1.school="school2";
        System.out.println(s1.getInfo()); //Name:Bob age:20 school:school2
    }
}
